//
//  WXLTypeIsTwoCollectionViewCell.m
//  段子手
//
//  Created by dllo on 16/3/20.
//  Copyright © 2016年 JokesTeam. All rights reserved.
//

#import "WXLTypeIsTwoCollectionViewCell.h"

@interface WXLTypeIsTwoCollectionViewCell ()

@property (nonatomic, retain) UIImageView *imageV; /**< 大图 */
@property (nonatomic, retain) UILabel *infoLabel; /**< 介绍label */

@end

@implementation WXLTypeIsTwoCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubView];
    }
    return self;
}

- (void)createSubView {
    self.imageV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.width)];
    [self addSubview:_imageV];
    
    self.infoLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, _imageV.frame.size.height, _imageV.frame.size.width, self.bounds.size.height - _imageV.frame.size.height)];
    [self addSubview:_infoLabel];
    _infoLabel.font = [UIFont systemFontOfSize:14];
    _infoLabel.numberOfLines = 2;
}

- (void)setModel:(WXLActionModel *)model {
    _model = model;
    
    [_imageV HANDLEIMAGE(_model.picUrl)];
    _infoLabel.text = _model.name;
}

@end
